package com.company.behavioral.iterator_pattern.concrete_aggregate;

import com.company.behavioral.iterator_pattern.aggregat.AbstractObjectList;
import com.company.behavioral.iterator_pattern.concrete_iterator.ProductIterator;
import com.company.behavioral.iterator_pattern.iterator.AbstractIterator;

import java.util.List;

/**
 * 商品数据
 * @ClassName ProductList
 * @Author tiezheng.han
 * @Date 2020/9/4 15:54
 **/
public class ProductList extends AbstractObjectList {


    public ProductList(List<Object> objects) {
        super(objects);
    }

    /**
     * 实现创建迭代器对象的具体工厂方法
     * @return
     */
    @Override
    public AbstractIterator createIterator() {
        return new ProductIterator(this);
    }
}
